<!DOCTYPE html>
<html   xmlns="http://www.w3c.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:p="http://primefaces.org/ui"
        xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head/>
    <h:body>
        <h:form>
            <p:inputText value="#{commandButtonBean.text}" />
            <p:commandButton type="reset" value="Reset" />
            <p:commandButton value="Save" actionListener="#{commandButtonBean.saveBook}" update="textbehind" />
            <p:commandButton type="button" value="Alert" onclick="alert(‘Prime’)" />
            <h:outputText value="#{commandButtonBean.text}" id="textbehind" />
        </h:form>
        <h:form>
            <h:inputText value="#{commandButtonBean.text}" />
            <p:commandButton value="Submit" update="display"/>
            <h:outputText value="#{commandButtonBean.text}" id="display" />
        </h:form>
    </h:body>
</html>